Colocalization by cross-correlation, a new method of colocalization suited for super-resolution microscopy

Background A common goal of scientific microscopic imaging is to determine if a spatial correlation exists between two imaged structures. This is generally accomplished by imaging fluorescently labeled structures and measuring their spatial correlation with a class of image analysis algorithms known as colocalization. However, the most commonly used methods of colocalization have strict limitations, such as requiring overlap in the fluorescent markers and reporting requirements for accurate interpretation of the data, that are often not met. Due to the development of novel super-resolution techniques, which reduce the overlap of the fluorescent signals, a new colocalization method is needed that does not have such strict requirements. Results In order to overcome the limitations of other colocalization algorithms, I developed a new ImageJ/Fiji plugin, Colocalization by cross-correlation (CCC). This method uses cross-correlation over space to identify spatial correlations as a function of distance, removing the overlap requirement and providing more comprehensive results. CCC is compatible with 3D and time-lapse images, and was designed to be easy to use. CCC also generates new images that only show the correlating labeled structures from the input images, a novel feature among the cross-correlating algorithms. Conclusions CCC is a versatile, powerful, and easy to use colocalization and spatial correlation tool that is available through the Fiji update sites. Full and up to date documentation can be found at https://imagej.net/plugins/colocalization-by-cross-correlation. CCC source code is available at https://github.com/andmccall/Colocalization_by_Cross_Correlation. Supplementary Information The online version contains supplementary material available at 10.1186/s12859-024-05675-z.


Cause of shorter µ
The shorter µ value compared to the true SCD that is present throughout the results comes from the calculation of the radial profile.Since the radial profile takes the average correlation at any given distance, it can be viewed as taking the average across the surface area of concentric spheres.Thus, the number of pixels over which we are averaging increases at a rate of roughly the distance squared as we profile greater distances.This results in the data being slightly skewed towards zero and is why our µ value results are consistently lower.
Another ICCS algorithm dealt with this by using an empirically determined correction factor that was adjusted dependent upon the lateral full-width at half maximum (FWHM) of the point spread function (PSF) 1 .However, with 3D ICCS like in CCC, the correction factor would need to be dependent upon both the lateral and axial FWHM, and the contribution of each FWHM value to the correction factor would depend on the average orientation of the spatial correlation.For example, cultured cells grown on a coverslip would be much more laterally oriented, and thus more dependent on the lateral FWHM, than an ex vivo organoid.Thus, it would be very complicated to implement a correction factor using FWHM values in CCC and would add numerous additional parameters that need to be set by the user.

Discussion on memory and runtime
CCC demands considerable computational resources during its execution.As an example, CCC analysis of two 1 GB 32-bit format images requires approximately 45 GB of memory.These values include the calculation of the contribution images, 10 randomization cycles, and no mask provided.Thus, in terms of memory, CCC requires roughly 50 times as much available memory as the 32-bit format size of one of the input images, which is consistent with other image sizes.Since all the calculations performed in CCC require floating-point precision, which is accomplished using 32-bit formats, providing 8 or 16-bit images to CCC makes a negligible difference in the memory requirements.Cross-correlation is also not a task that can be split up into smaller parts and produce the same result, limiting room for memory optimization.Importantly, since each frame of time-lapse data is analyzed individually, the memory requirements for time-lapse datasets would only be a little over 50 times the size of a single frame.Some additional memory would be required as the output is consolidated.
Runtime speed is much more variable, as it is highly dependent on the specifications of the computer, but for the example above, with an Intel Core i7-8700 3.2GHz CPU, the runtime was 80 minutes.However, this could have been substantially improved if the computer had more available memory, as its 52 GB was near the minimum requirement to analyze these images.Being near the minimum causes the Java garbage collector to run frequently and increases runtime significantly.Currently, CCC is multithreaded optimized, so increasing the number of logical processors can also improve the runtime.The runtime speed of CCC could be further improved with a GPU-optimized cross-correlation algorithm, something that is currently in development.

Determining the number of iterations to use
Currently, the number of randomization iterations is a value that must be set by the user for CCC analysis.Increasing the number of iterations generates more consistent results, primarily resulting in less variation in the σ and confidence values, but also increases computation time significantly.To determine a minimally appropriate number of iterations the user can simply analyze the same two images multiple times for various randomization iterations, and compare the standard deviation or range of the confidence values.As an example, when the deconvolved SD-40, 1.13 µm spatial correlation distance test image is analyzed in this way, 10 repeat analyses using only a single randomization step results in confidence ranging from <> to <>.Using the same process and images with 10 randomization steps for each analysis results in confidence ranging from <> to <>, substantially less variation.These results will change depending on the characteristics input images (molecular density, fluorophore distribution, etc.), so should be tested for any new research project.In general, most datasets do not require more than a few iterations to get to quite low variability in the results.Ten iterations was used in this manuscript to ensure that the observed variability was due to real differences in the test images, and not due to variability from the randomization process.However, for most experimental applications, this number of iterations would probably be unnecessary.